<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title>{if isset($data_seo.seo_title)}{$data_seo.seo_title}{/if}</title>
        <link rel="stylesheet" type="text/css" href="/static/home/css/swiper-4.2.2.min.css">
        <link rel="stylesheet" href="/static/home/css/main.css">
        <script src="/static/home/js/swiper-4.2.2.min.js" ></script>
        <link rel="stylesheet" type="text/css" href="/static/home/css/alert.css">
    </head>
    <body>
        {include file="public/header" /}

        <div class="houdong-1" style="background-color: #fff">
            <div class="houdong-1-bt">
               <div class="bxz"><a href = "/index.php/Kephome/khfk.html"><img class="bt1" src="/static/home/img/fk1.png" alt=""><img class="bt2" src="/static/home/img/fk1(1).png" alt=""></a></div>
                <div><a href="/index.php/Kephome/index.html"><img class="bt1" src="/static/home/img/fk2.png" alt=""><img class="bt2" src="/static/home/img/fk2(1).png" alt=""></a></div>
                <div><img class="bt1" src="/static/home/img/fk3.png" alt=""><img class="bt2" src="/static/home/img/fk3(1).png" alt=""></div>
            </div>
        </div>
        <form action="" method="post" onsubmit="return subForm()"  enctype="multipart/form-data" id ="works-form" >
            <div class="khfk-2">
                <div class="khfk-2-1">
                    <img src="/static/home/img/yijian.png" alt="">
                    <div>
                        <p>请留下您的建议或意见！</p>
                        <span>您对我们的客户服务，服务妆容，照片质量，产品等有任何疑问和建议，您都可以通过此平台与粉黛墨品牌进行沟通。提交成功后5分钟内会有客服与您联系，请保持电话畅通。</span>
                    </div>
                </div>
                <div class="khfk-2-2">
                    <div>
                        <p>姓名/Name：</p>
                        <div class="khfk-2-2-1"><input id ="name" name="name" id="name" type="text" placeholder="请输入您的姓名"></div>
                    </div>
                    <div>
                        <p>电话/Phone：</p>
                        <div class="khfk-2-2-1"><input name="phone" id="phone" type="text" placeholder="请输入您的联系方式"></div>
                    </div>
                </div>
                <div class="khfk-2-3">
                    <p>建议内容/Advice：</p>
                    <div class="khfk-2-3-1"><textarea name="content" id ="content" style="resize:none"  placeholder="请输入您对粉黛墨的建议或意见" ></textarea></div>
                </div>
                <div class="khfk-2-4">
                    <p>验证码/Verification code：</p>
                    <div>
                        <div class="khfk-2-4-1"><input name="yzm" id="name1" type="text" placeholder="请输入验证码"></div><img src="/static/home/img/jiayanzhengma.jpg" alt="">
                        
                        
                        <div class="form-group">

                            <label class="control-label">验证码：</label>

                            <input class="input-text size-L" type="text" placeholder="验证码" onblur="if(this.value==''){this.value='验证码:'}" onclick="if(this.value=='验证码:'){this.value='';}" value="验证码:" style="width:140px;" name="captchas" id="captchas">

                            <img src="/admin.php/index/verify.html" alt="captcha" id="yzm">

                            <a id="kanbuq" href="javascript:;" onclick="verify_img()">更换</a>

                        </div>
                    </div>

                </div>
                <div class="khfk-2-5">
                    <div class="khfk-2-5-1">重置</div>
                     <button class="btn btn-primary" type="submit" >提交</button>
                </div>
            </div>

        </form>

        {include file="public/foot" /}
        <div class="zhanpin">
            <img class="gb" src="/static/home/img/guabi.png" alt="">
        </div>
        <script src="/static/home/js/jquery-1.11.3.js"></script>
        <script src="/static/home/js/alert.js"></script>
        <script src="/static/home/js/main.js"></script>
        <script>

         function subForm() {
             var name = $("#name").val();
             var phone = $("#phone").val();
             var content = $("#content").val();
             var code = $("input[name='captchas']").val();
             
             if (name == '') {
                 alert('请填写姓名');
                 return false;
             }
             if (phone == '') {
                 alert('请填联系方式');
                 return false;
             }
             if (content == '') {
                 alert('请填建议内容');
                 return false;
             }
             $.post('/index.php/Kephome/add_kz',{name:name,phone:phone,content:content,code:code},function(res){

            if( 1 == res.code){

                alert(res.msg);


            }else{

                alert(res.msg);

                $("#yzm").attr('src','/admin.php/index/verify.html'+'?'+Math.random);

            }



        },'json');


             return false;

         }
         
         
            function verify_img()

    {

        $("#yzm").attr('src','/admin.php/index/verify.html'+'?'+Math.random)

    }
        </script>
    </body>
